#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() 
{ 
	//TODO
	string word;
	vector<string> words;
	
	
	while (cin>>word){
		words.push_back(word);
		if (cin.get() == '\n') break;
	}

	int size=words.size();
	for (int i=size-1;i>=0;i--){
		if (i!=size-1)cout<<" ";
		cout<<words[i];
	}
	cout<<endl;
    return 0;
}
